define(function(require, exports, module) {
	"require:nomunge,exports:nomunge,module:nomunge";

	var app = require('mokit/app');
	var ProjectListView = require('../views/project-list');
	var commonUtils = require('../common/utils');
	var Project = require('../models/Project');

	/**
	 * 社友录页面控制器
	 */
	return app.controller.create({
		isSetting: true,
		/**
		 * 默认action
		 */
		index: function(context) {
			var self = this;
			Project.iniList(context.routeData.cat, function() {
				self.setView(new ProjectListView({
					model: Project
				}));
			});
		},
		sortList: function(context, sortBy) {
			Project.sortList(sortBy, function() {
				context.view.render();
			});
		},		
		
	});

});